import Mock from 'mockjs2'
import { builder } from '../util'

const bedList = []

for (var i = 0; i < 10; i++) {
  const bed = {
    id: Mock.mock('@increment'),
    number: Mock.mock('10@integer(1,10)'),
    bedNum: 6
  }
  bedList.push(bed)
}

const beds = () => {
  return builder(bedList)
}
const del = (id) => {
  return builder()
}

Mock.mock(/\/api\/bed\/get/, 'get', beds)
Mock.mock(/\/api\/bed\/del/, 'post', del)
